package org.aepscolombia.platform.models.entity;
// Generated Apr 8, 2014 9:37:27 AM by Hibernate Tools 3.2.1.GA


import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Preparations generated by hbm2java
 */
@Entity

@Table(name="preparations")
public class Preparations  implements java.io.Serializable {


    private Integer idPrep;
    private ProductionEvents productionEvents;
    private PreparationsTypes preparationsTypes;
    private Date datePrep;
    private Double depthPrep;
    private Boolean useHillsPrep;
    private String otherPreparationTypePrep;
    private Integer passingsNumberPrep;
    private Boolean status;
    private Integer createdBy;

    public Preparations() {
    }

	
    public Preparations(ProductionEvents productionEvents, Date datePrep) {
        this.productionEvents = productionEvents;
        this.datePrep = datePrep;
    }
    
    public Preparations(ProductionEvents productionEvents, PreparationsTypes preparationsTypes, Date datePrep, Double depthPrep, Boolean useHillsPrep, String otherPreparationTypePrep, Integer passingsNumberPrep, Boolean status, Integer createdBy) {
       this.productionEvents = productionEvents;
       this.preparationsTypes = preparationsTypes;
       this.datePrep = datePrep;
       this.depthPrep = depthPrep;
       this.useHillsPrep = useHillsPrep;
       this.otherPreparationTypePrep = otherPreparationTypePrep;
       this.passingsNumberPrep = passingsNumberPrep;
       this.status = status;
       this.createdBy = createdBy;
    }
   
    @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="id_prep", unique=true, nullable=false)
    public Integer getIdPrep() {
        return this.idPrep;
    }
    
    public void setIdPrep(Integer idPrep) {
        this.idPrep = idPrep;
    }
    
    @ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="id_production_event_prep", nullable=false)
    public ProductionEvents getProductionEvents() {
        return this.productionEvents;
    }
    
    public void setProductionEvents(ProductionEvents productionEvents) {
        this.productionEvents = productionEvents;
    }
    
    @ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="preparation_type_prep")
    public PreparationsTypes getPreparationsTypes() {
        return this.preparationsTypes;
    }
    
    public void setPreparationsTypes(PreparationsTypes preparationsTypes) {
        this.preparationsTypes = preparationsTypes;
    }
    
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="date_prep", nullable=false, length=19)
    public Date getDatePrep() {
        return this.datePrep;
    }
    
    public void setDatePrep(Date datePrep) {
        this.datePrep = datePrep;
    }
    
    @Column(name="depth_prep", precision=22, scale=0)
    public Double getDepthPrep() {
        return this.depthPrep;
    }
    
    public void setDepthPrep(Double depthPrep) {
        this.depthPrep = depthPrep;
    }
    
    @Column(name="use_hills_prep")
    public Boolean getUseHillsPrep() {
        return this.useHillsPrep;
    }
    
    public void setUseHillsPrep(Boolean useHillsPrep) {
        this.useHillsPrep = useHillsPrep;
    }
    
    @Column(name="other_preparation_type_prep", length=65535)
    public String getOtherPreparationTypePrep() {
        return this.otherPreparationTypePrep;
    }
    
    public void setOtherPreparationTypePrep(String otherPreparationTypePrep) {
        this.otherPreparationTypePrep = otherPreparationTypePrep;
    }
    
    @Column(name="passings_number_prep")
    public Integer getPassingsNumberPrep() {
        return this.passingsNumberPrep;
    }
    
    public void setPassingsNumberPrep(Integer passingsNumberPrep) {
        this.passingsNumberPrep = passingsNumberPrep;
    }
    
    @Column(name="status")
    public Boolean getStatus() {
        return this.status;
    }
    
    public void setStatus(Boolean status) {
        this.status = status;
    }
    
    @Column(name="created_by")
    public Integer getCreatedBy() {
        return this.createdBy;
    }
    
    public void setCreatedBy(Integer createdBy) {
        this.createdBy = createdBy;
    }

}


